using System;
using IBatisNet.DataMapper;
using Com.Pirate.Infrastructure.Services.Contracts;
using Com.Pirate.Common.Contexts;

namespace Com.Pirate.Infrastructure.Services
{
	public sealed class InfrastructureFactory : IInfrastructureFactory
	{
		#region Methods (3) 
		public IDataContext GetDataContext()
		{
			return CoreDataContext.GetDataContext();
		}
		
		public ISqlMapper GetSqlMapper()
		{
            return IbatisSqlMapContext.Context.GetSqlMapper();
		}

        public ISqlMapper GetSqlMapper(string databaseName)
        {
            return IbatisSqlMapContext.Context.GetSqlMapper(databaseName);
        }

		#endregion Methods
	}
}

